﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.Xml.Serialization;

namespace VPLink2013.Framework
{
	[DataContract]
	public class WeatherInfo
	{
		[DataMember( Name = "Code", Order = 1 )]
		[XmlAttribute( "number" )]
		public string Code { get; set; }

		[DataMember( Name = "Description", Order = 2 )]
		[XmlAttribute( "value" )]
		public string Description { get; set; }
	}

	[DataContract]
	public class TemperatureInfo
	{
		[DataMember( Name = "TempCurrent", Order = 1 )]
		[XmlAttribute( "value" )]
		public string TempCurrent { get; set; }

		[DataMember( Name = "TempMin", Order = 1 )]
		[XmlAttribute( "min" )]
		public string TempMin { get; set; }

		[DataMember( Name = "TempMax", Order = 2 )]
		[XmlAttribute( "max" )]
		public string TempMax { get; set; }
	}

	[DataContract]
	[XmlRoot( "current" )]
	public class MeteoInfo
	{
		[DataMember( Name = "Weather", Order = 1 )]
		[XmlElement( "weather" )]
		public WeatherInfo WeatherInfo { get; set; }

		[DataMember( Name = "Temperature", Order = 2 )]
		[XmlElement( "temperature" )]
		public TemperatureInfo TemperatureInfo { get; set; }
	}
}
